package com.realife.eson.common.config;

import com.github.pagehelper.util.StringUtil;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * <blockquote></blockquote>
 *
 * @author
 * @email
 * @date
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "gitlab.api")
public class GitlabApiProperties {

    private String host;
    private String privateToken;
    private String regularPrivateToken;

    public String getHost() {
        if (StringUtil.isNotEmpty(host) && !host.endsWith("/")) {
            return host + "/";
        }
        return host;
    }

    public String getPrivateToken() {
        return privateToken;
    }

    public String getRegularPrivateToken() {
        return regularPrivateToken;
    }


}
